<?php
if($act=="editcontent")
{
    $sql_select = "SELECT * FROM tblcontent WHERE iId = $id and cLanguage='$language'";

	$rs=$dbsql->query($sql_select);
	if($dbsql->num_rows($rs)==0)
	{
		page_transfer("Content not exists");
	}
	$content= $dbsql->fetch_array($rs);
	Select_Tag($id,'Content%');
    $type=getTypeParent($content['iParentId']);
}
else
{
    $type=getTypeParent($id);
    $content                = array();
    $content['iParentId']   = $id;
    $content['iStatus']     = 1;
    $id                     = 0;
}

function getTypeParent($id)
{
global $dbsql;
	//-----------------------------------------------------
	$sql_select="select iHasHighLine from tblcategory where iId='$id' ";
	$rs=$dbsql->query($sql_select);
	$result = $dbsql->fetch_array($rs);
	if($result['iHasHighLine']==1)
	{
		return "highline";
	}
	return;
}
?>